package com.thinkgem.jeesite.modules.tb_message.webSocket;

import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal;

public class UserInstance {

	private Principal principal;//当前用户登录对象
	private static UserInstance userInstance;
	
	private UserInstance(){
		
	}


	public Principal getPrincipal() {
		return principal;
	}


	public void setPrincipal(Principal principal) {
		this.principal = principal;
	}
	
	public synchronized static UserInstance getInstance(){
			if(userInstance==null){
				userInstance = new  UserInstance();
			}
		return userInstance;
	}
	
	
}
